<?php
namespace app\shop\library;

use app\shop\library\ApiController;
use app\shop\library\Member;

class ApiAuthController extends ApiController{

    public function __construct()
    {
        parent::__construct();

        if (!Member::$login){
            $this->failLogout(Member::$errorMsg);
        }

    }

    protected function failLogout(string $message){
        $re['status']  = 'logout';
        $re['msg'] = $message;
        $re['content'] = '';
        $re['data']    = [];
        echo json_encode($re);
        exit();
    }
}